<script setup>
import { computed } from 'vue'
const props = defineProps({
  prefix: {
    type: String,
    default: 'icon'
  },
  name: {
    type: String,
    required: true
  },
  color: {
    type: String,
    default: '#ffffff'
  },
  size: {
    type: String,
    default: '1em'
  }
})
const symbolId = computed(() => `#${props.prefix}-${props.name}`)
console.log(props.name, symbolId.value)
</script>

<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <svg
    aria-hidden="true"
    class="svg-icon"
    :width="props.size"
    :height="props.size"
  >
    <use
      :xlink:href="symbolId"
      :x="0"
      :y="0"
      rel="external nofollow"
      :fill="props.color"
    />
  </svg>
</template>
